import { createApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import App from './App.vue'
import { useQueueStore } from './stores/queue'

const app = createApp(App)
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)

app.use(pinia)
app.mount('#app')

window.queueStore = useQueueStore()
window.pluginConfig = await fetch('./plugin.config.json').then(res => res.json())
console.log('Loaded plugin config:', window.pluginConfig)
